package day7;

import java.util.Arrays;
import java.util.Scanner;

public class demo3 {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        int n=in.nextInt();
        int []arr=new int[6];

        for (int i = 0; i <n ; i++) {
            for (int j = 0; j <6 ; j++) arr[j]= in.nextInt();
            Arrays.sort(arr);
            if((arr[0]+arr[1]>arr[2]&&arr[3]+arr[4]>arr[5])
            ||(arr[0]+arr[2]>arr[3]&&arr[1]+arr[4]>arr[5])
                    ||(arr[0]+arr[3]>arr[4]&&arr[1]+arr[2]>arr[5])
                    ||(arr[0]+arr[4]>arr[5]&&arr[1]+arr[2]>arr[3])
            ){
                System.out.println("Yes");
            }else System.out.println("No");

        }

    }
}
